CREATE TABLE [dbo].[AdjustmentDetails]
(
[StockOutDetailId] [bigint] NOT NULL IDENTITY(1, 1),
[AdjustmentId] [nvarchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[DrugId] [nvarchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Quantity] [int] NOT NULL,
[AdjustQuantity] [int] NOT NULL,
[FinalQuantity] [int] NOT NULL,
[Remark] [nvarchar] (250) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AdjustmentDetails] ADD CONSTRAINT [PK_AdjustmentDetails] PRIMARY KEY CLUSTERED  ([StockOutDetailId]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AdjustmentDetails] ADD CONSTRAINT [FK_AdjustmentDetails_Adjustment] FOREIGN KEY ([AdjustmentId]) REFERENCES [dbo].[Adjustment] ([AdjustmentId])
GO
ALTER TABLE [dbo].[AdjustmentDetails] ADD CONSTRAINT [FK_AdjustmentDetails_DrugDispo] FOREIGN KEY ([DrugId]) REFERENCES [dbo].[DrugDispo] ([DrugId])
GO
